#include"thread_pool.h"
#include "user.h"
extern ListNode * userList;

void pwdCommand(task_t * task) {
    //遍历用户链表获取其当前目录
    ListNode * p = userList;
    while(p){
        if(p->val->peerfd != task->peerfd || p->val->login_status ==LOGIN_OUT){
            p = p->next;
        }else{
            user_info *user = p->val;
            int len = strlen(user->pwd);
            sendn(task->peerfd,&len,4);
            sendn(task->peerfd,user->pwd,len);
            break;
        }
    }
}
